# $Id: PKGBUILD 54513 2011-08-19 14:54:48Z ibiru $
# Maintainer: Roman Kyrylych <Roman.Kyrylych@gmail.com>
# Contributor: William Rea <sillywilly@gmail.com>

pkgname=xalan-c
pkgver=1.11_pre1153059
pkgrel=1
pkgdesc="A XSLT processor for transforming XML documents"
arch=('i686' 'x86_64')
url="http://xml.apache.org/xalan-c"
license=('APACHE')
depends=('xerces-c')
source=(http://mirrors.kernel.org/gentoo/distfiles/Xalan-C_r1153059-src.tar.gz
	1.11.0_pre797991-as-needed.patch
        1.11.0_pre797991-bugfixes.patch
        1.11.0_pre797991-parallel-build.patch)
md5sums=('98ea8584ccdbb9044757dda725f780bf'
         '7040fb617e26fbdadc423948d3a23558'
         'fe7af1f3a9e02ad813481f0e1a84f16c'
         '633b4ab702cb0ea0cf1010cadef7ac4c')

build() {
  export XALANCROOT=${srcdir}/xml-xalan/c

  cd ${srcdir}/xml-xalan/c
  patch -Np2 -i ${srcdir}/1.11.0_pre797991-as-needed.patch
  patch -Np2 -i ${srcdir}/1.11.0_pre797991-bugfixes.patch
  patch -Np2 -i ${srcdir}/1.11.0_pre797991-parallel-build.patch

  ./runConfigure -p linux -c gcc -x g++ -P/usr
  #./configure --prefix=/usr
  make
}

package() {
  cd ${srcdir}/xml-xalan/c
  make DESTDIR=${pkgdir} install
}
